package com.tofix.kidmall.service;

import com.tofix.kidmall.common.CommonPage;
import com.tofix.kidmall.common.CommonResult;
import com.tofix.kidmall.entity.Role;
import com.tofix.kidmall.exception.ApiExcetion;
import org.springframework.data.domain.Page;

import java.util.List;
import java.util.Optional;

public interface RoleService {
    Optional<Role> getById(String id);

    Role insertRole(Role role);

    void deleteRole(String id) throws ApiExcetion;

    Role saveRole(Role role);

    CommonPage<Role> getAllByPage(Integer currentPage, Integer pageSize);

    CommonResult<List<Role>> getAll();

}
